<?php

$host = '127.0.0.1';
$user = 'root';
$pwd = 'root';
$dbname = 'msg';

$db = new mysqli($host, $user, $pwd, $dbname);
if( $db->connect_errno <> 0 ){
	die('链接数据库失败');
}
	
$db->query("SET NAMES UTF8");

?>